<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<title></title>
	</head>
	<body>
		<h2>
			<H1>Website Payments Standard web samples using ASP.Net</H1>
		</h2>
		<STRONG>
			<P><B>VERSION 1.0.0</B></P>
		</STRONG>
		<P>This document describes web samples that use advanced features for Website 
			Payments Standard - including button encryption, Payment Data Transfer (PDT), 
			and Instant Payment Notification (IPN) in the following sections:</P>
		<UL type="disc">
			<LI>
			Intended audience
			<LI>
				<A href="#requiredsoftware">Required software</A>
			<LI>
				<A href="#installation">Installing the samples</A>
			<LI>
				<A href="#runningsamples">Running the samples</A>
			<LI>
				<A href="#sampledescription">Description of samples</A>
			<LI>
				<A href="#APIDocumentation">API&nbsp;documentation</A></LI></UL>
		<h2>
			<DIV style="TEXT-ALIGN: center" align="center">
				<HR align="center" width="100%" SIZE="2">
			</DIV>
			<H2>Intended audience</H2>
		</h2>
		<P>The following are examples of Website Payments Standard's advanced features, 
			which include code for its function:</P>
		<UL type="disc">
			<LI>
				<STRONG>Button encryption</STRONG> - Dynamically encrypt payment information 
				with this script before sending the request to PayPal. Learn more at <A href="https://www.paypal.com/IntegrationCenter/ic_button-encryption.html">
					https://www.paypal.com/IntegrationCenter/ic_button-encryption.html</A>
			<LI>
				<STRONG>Payment Data Transfer -</STRONG> &nbsp;Pull payment data after a 
				successful transaction with this script before sending the request to the 
				PayPal. Learn more at&nbsp;<A href="https://www.paypal.com/IntegrationCenter/ic_pdt.html">https://www.paypal.com/IntegrationCenter/ic_pdt.html</A>
			<LI>
				<STRONG>Instant Payment Notification -&nbsp;</STRONG>Pull payment data after a 
				successful transaction with this script, which provides data asynchronously. 
				Learn more at&nbsp;<A href="https://www.paypal.com/IntegrationCenter/ic_ipn.html">https://www.paypal.com/IntegrationCenter/ic_ipn.html</A>.
				<P></P>
			</LI>
		</UL>
		<P>
			These code samples aren't needed if you don't use these features. PayPal 
			provides easier methods to create payment buttons.Learn more button at&nbsp;<A href="https://www.paypal.com/IntegrationCenter/ic_standard_home.html#BuyNowButtons">https://www.paypal.com/IntegrationCenter/ic_standard_home.html#BuyNowButtons</A></P>
		<DIV align="center">
			<HR align="center" width="100%" SIZE="2">
		</DIV>
		<h2>&nbsp;Required software<A name="requiredsoftware"></A>
		</h2>
		<P>The following software is required:</P>
		<P>
			<TABLE id="Table1" cellPadding="0" border="1">
				<TR>
					<TD>
						<P style="TEXT-ALIGN: center" align="center"><B>Software </B>
						</P>
					</TD>
					<TD width="65">
						<P style="TEXT-ALIGN: center" align="center"><B>Version </B>
						</P>
					</TD>
					<TD>
						<P style="TEXT-ALIGN: center" align="center"><B>Download Location </B>
						</P>
					</TD>
				</TR>
				<TR>
					<TD height="40">
						<P>.Net Framework</P>
					</TD>
					<TD width="65" height="40">
						<P>1.1</P>
					</TD>
					<TD height="40">
						<P><A href="http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3&amp;displaylang=en</A>
						</P>
					</TD>
				</TR>
				<TR>
					<TD>
						<P>IIS</P>
					</TD>
					<TD width="65">
						<P>6.0</P>
					</TD>
					<TD>
						<P><A href="http://www.microsoft.com/windowsserver2003/iis/evaluation/features/default.mspx">http://www.microsoft.com/windowsserver2003/iis/evaluation/features/default.mspx</A>
							&nbsp;(comes with Microsoft Operating System)</P>
					</TD>
				</TR>
			</TABLE>
		</P>
		<P>You must install and configure DotNet Framework with the IIS.</P>
		<DIV align="center">
			<HR align="center" width="100%" SIZE="2">
		</DIV>
		<H2>Installing the samples<A name="installation"></A></H2>
		<OL>
			<LI>
			Unzip the PayPal_AspNet_WPS_Toolkit.zip file, for example to C drive. You will 
			see a PayPalWPSToolKit folder created under C Drive.
			<LI>
			Run &lt;install_directory&gt;\PayPalWPSToolKit\InstallSample.bat
			<LI>
				To enable logging, add "Full Control" permissions to the logs folder for the
				<SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">
					<FONT size="3">appropriate</FONT>
				</SPAN>
				user:
				<BR>
				<STRONG>IIS 6.0:</STRONG> The username used to run IIS, which is "NETWORK 
				SERVICE" by default. <STRONG>Pre IIS 6.0:</STRONG> &lt;MACHINE NAME&gt;\ASPNET 
				where &lt;MACHINE NAME&gt; is the name of your local machine.
			</LI>
		</OL>
		The default&nbsp;EWP credentials used by these samples are:
		<table id="tablecredentials" cellPadding="0" border="1">
			<tr>
				<td>Default Business Account:</td>
				<td>sdk.seller@gmail.com</td>
			</tr>
			<tr>
				<td>
					Cert ID:</td>
				<td>KJAERUGBLVF6Y</td>
			</tr>
			<tr>
				<td>
					Path to EWP certificate:</td>
				<td>&lt;install_directory&gt;\EWPCert\sdk-ewp.p12 Path to PayPal Public 
					certificate: &lt;install_directory&gt;\EWPCert\paypal_cert_pem.txt</td>
			</tr>
		</table>
		<PRE>&nbsp;</PRE>
		<HR align="center" width="100%" SIZE="2">
		<PRE>&nbsp;</PRE>
		<H2>
			Running the samples<A name="runningsamples"></A></H2>
		<P>
			First,&nbsp;be sure you have installed the <A href="#requiredsoftware">required 
				software</A> and the <A href="#installation">samples</A>.</P>
		<P>
			You can run the samples by entering this address in a web browser:</P>
		<PRE><A href="http://localhost/PaypPal_WPS_ToolKit/Default.aspx">http://localhost/PaypPal_WPS_ToolKit/Default.aspx</A></PRE>
		<PRE style="TEXT-ALIGN: center"><HR align=center width="100%" SIZE=2></PRE>
		<h2>
			<a name="sampledescription"></a>
			<H2>Description of samples</H2>
		</h2>
		<P>The web samples consist of the following:</P>
		<UL type="disc">
			<LI>
				<A href="#buynow">Creating an encrypted Buy Now button</A>
			<LI>
				<A href="#commonfiles">Common files</A></LI></UL>
		<P>The main page of the samples - Default.aspx -&nbsp;contains links to each 
			sample.</P>
		<H2>
			<H3>Creating an encrypted Buy Now button</H3>
		</H2>
		<P>
			This sample shows how to dynamically encrypt payment data before sending the 
			request to PayPal</P>
		<P>
			<TABLE id="Table2" cellPadding="2" border="1">
				<TR>
					<TD vAlign="top">
						<P><STRONG>Encrypted Buy Now button</STRONG></P>
					</TD>
					<TD>
						<P>Create an encrypted Buy Now button and complete payment on PayPal</P>
					</TD>
				</TR>
			</TABLE>
		</P>
		<P>The primary files for this sample are:</P>
		<P>
			<TABLE id="Table3" cellPadding="0" border="1">
				<TR>
					<TD width="153">
						<P align="center"><B>File </B>
						</P>
					</TD>
					<TD>
						<P align="center"><B>Description </B>
						</P>
					</TD>
				</TR>
				<TR>
					<TD width="153">
						<A name="InputBuyNowParameters"></A>
						<P><CODE>InputBuyNowParameters.aspx</CODE></P>
					</TD>
					<TD>
						<P>This page collects payment parameters for the Buy Now button to be generated by 
							encryption.
						</P>
						<P>Called by <A href="#Default">Default.aspx</A>.
						</P>
						<P>Calls&nbsp;<A href="#buynow">BuyNow.aspx</A>.
						</P>
					</TD>
				</TR>
				<TR>
					<TD width="153">
						<a name="buynow"></a>
						<P><CODE>BuyNow.aspx</CODE></P>
					</TD>
					<TD>
						<P>
							This page&nbsp; generate the encrypted BuyNow button using payment parameters 
							collected through the InputBuyNowParameters.aspx page.
						</P>
						<P>The code collects Buy Now parameters from the form displayed by 
							InputBuyNowParameters.aspx then constructs Buy Now button&nbsp;by calling 
							EncryptButton method of the EWPServices class.
						</P>
						<P>
							After the button parameter&nbsp; are encrypted using sdk-ewp.p12 certificate, 
							the BuyNow button is displayed with the encrypted BLOB.
						</P>
						<P>Called by <A href="#InputBuyNowParameters">InputBuyNowParameters.aspx</A>.
						</P>
						<P>Calls EWPServices.cs
						</P>
					</TD>
				</TR>
				<TR>
					<TD width="153">
						<a name="PDTResponse"></a>
						<P><CODE>PDTResponse.aspx</CODE></P>
					</TD>
					<TD>
						<P>
							This page gets the PDT Get Parameters of the PDT transaction, and posts back 
							the same to get the status of the Website Payments Standard transaction</P>
						<P>Called by PayPal to give notification about the Website Payment Standard 
							transaction status.</P>
					</TD>
				</TR>
				<TR>
					<TD width="153">
						<a name="EWPCredentials"></a>
						<P><CODE>EWPCredentials.aspx</CODE></P>
					</TD>
					<TD>This page shows the credentials used for encrypting the Buy Now button.</TD>
				</TR>
				<TR>
					<TD width="153"><PRE>NotifyUrl.ashx</PRE>
					</TD>
					<TD>This handler file listen for the IPN postback from the PayPal server, and logs 
						a message in the IPN log file.</TD>
				</TR>
			</TABLE>
		</P>
		<H2>
			<H3>Common files</H3>
			<H3><A name="commonfiles">
					<P>
						&nbsp;</P>
					<TABLE id="Table4" cellPadding="0" border="1">
						<TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes">
							<TD width="84">
								<P style="TEXT-ALIGN: center" align="center"><B>File </B>
								</P>
							</TD>
							<TD>
								<P style="TEXT-ALIGN: center" align="center"><B>Description </B>
								</P>
							</TD>
						</TR>
						<TR>
							<TD width="84">
								<a name="Default"></a>
								<P><CODE>Default.aspx</CODE></P>
							</TD>
							<TD>
								<P>The main web page with links to each sample.
								</P>
								<P>Calls PayPal.ipn.log, <A href="#InputBuyNowParameters">InputBuyNowParameters.aspx</A>, 
									and <A href="#EWPCredentials">EWPCredentials.aspx</A>.
								</P>
							</TD>
						</TR>
						<TR>
							<TD width="84">
								<P><CODE>sdk.css</CODE></P>
							</TD>
							<TD>
								<P>Cascading Style Sheet (CSS) used by all sample pages.
								</P>
							</TD>
						</TR>
						<TR>
							<TD width="84">
								<P><CODE>constants.cs</CODE></P>
							</TD>
							<TD>
								<P>This is the configuration file for the samples.This file contains the parameters 
									needed to encrypt the Buy Now button parameters.
								</P>
								<P>PayPal includes the following EWP credentials for encrypting the Buy Now 
									button&nbsp;:
								</P>
								<TABLE cellPadding="0" border="1">
									<TR>
										<TD colSpan="2">
											<P align="center">EWP credentials
											</P>
										</TD>
									</TR>
									<TR>
										<TD>
											<P>&nbsp;Default Business Account
											</P>
										</TD>
										<TD>
											<P><CODE>sdk.seller@gmail.com</CODE></P>
										</TD>
									</TR>
									<TR>
										<TD>
											<P>Cert ID
											</P>
										</TD>
										<TD>
											<P><CODE>B62GVU8RWNBFC</CODE></P>
										</TD>
									</TR>
									<TR>
										<TD>
											<P>EWP certificate
											</P>
										</TD>
										<TD>
											<P><CODE>sdk-ewp.p12</CODE></P>
										</TD>
									</TR>
									<TR>
										<TD>Identity</TD>
										<TD><PRE>6vwLEY_ogPGnoQac2a0x4PRsSGrmzJPMkyGbJtpiCSwrkYsNSYxWfPY2ZLO</PRE>
										</TD>
									</TR>
								</TABLE>
								<P>&nbsp;</P>
							</TD>
						</TR>
						<TR>
							<TD width="84"><PRE>paypal.ipn.log</PRE>
							</TD>
							<TD>
								IPN log file - logs all IPN details received through listener with DateTime 
								stamp.</TD>
						</TR>
					</TABLE>
					<DIV></DIV>
				</A>
			</H3>
		</H2>
		<H2>
			<H2>Documentation<A name="APIDocumentation"></A></H2>
		</H2>
		<P>The <I>Website Payments Standard Integration Guide</I> is available in&nbsp;PDF 
			format.</P>
		<P>
			<TABLE cellPadding="2" border="1">
				<TR>
					<TD>
						PDF
					</TD>
					<TD>
						<A href="https://www.paypal.com/en_US/pdf/PP_WebsitePaymentsStandard_IntegrationGuide.pdf">
							https://www.paypal.com/en_US/pdf/PP_WebsitePaymentsStandard_IntegrationGuide.pdf</A>
					</TD>
				</TR>
			</TABLE>
		</P>
		</SPAN></SPAN></SPAN></SPAN>
	</body>
</html>
